package org.hilo.boot.mybatis;

import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;

/**
 * 生成文件
 * 
 * @author zollty
 * @since 2018-3-16
 */
public class GenerateMojo extends AbstractGenerateMojo {

    public void execute() {
        logger.info("准备生成文件..........................");
        AutoGenerator mpg = new AutoGenerator();
        initConfig();
        mpg.setConfig(config);
        mpg.setTemplateEngine(new FreemarkerTemplateEngine());
        mpg.execute();
        logger.info("文件生成完成！！！..........................");
    }

}
